﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace SQT.tracnghiem.Ajax.ASP
{
    public partial class send_Contact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //alert(fullname + " " + birthday + " " + sex + " " + email + " " + phone + " " + address + " " + job + " " + traditional + " " + purpose + " " + degree + " " + cls + " " + request);
            string fullname = Request.Form["fullname"];
            string birthday = Request.Form["birthday"];
            int sex = int.Parse(Request.Form["sex"]);
            string email = Request.Form["email"];
            string phone = Request.Form["phone"];
            string address = Request.Form["address"];
            string job = Request.Form["job"];
            string traditional = Request.Form["traditional"];
            string purpose = Request.Form["purpose"];
            string degree = Request.Form["degree"];
            string cls = Request.Form["cls"];
            string request = Request.Form["request"];
            bool bo_sex = true;
            if(sex==0)
                bo_sex=false;
            new TblContactController().Insert(fullname, DateTime.Parse(birthday), bo_sex, email, phone, address, job, traditional, purpose, degree, cls, request, false,DateTime.Now,null);
        }
    }
}